import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/Home',
      component: resolve => require(['../components/Home.vue'], resolve),
      meta: { title: '自述文件' },
      redirect: '/Home/Index',
      children: [
        {
          path: '/Home/Index',
          component: resolve => require(['../pages/IndexPage.vue'], resolve),
          meta: { title: 'Index' }
        },
        {
          path: '/Home/User',
          component: resolve => require(['../pages/UserPage.vue'], resolve),
          meta: { title: 'User' }
        },
        {
          path: '/Home/Topic',
          component: resolve => require(['../pages/TopicPage.vue'], resolve),
          meta: { title: 'Forum' }
        },
        {
          path: '/Home/SpeTopic',
          component: resolve => require(['../pages/SpeTopic.vue'], resolve),
          meta: { title: 'SpeTopic' }
        },
        {
          path: '/Home/Announce',
          component: resolve => require(['../pages/AnnouncePage.vue'], resolve),
          meta: { title: 'Announce' }
        },
        {
          path: '/Home/SpeAnnounce',
          component: resolve => require(['../pages/SpeAnnounce.vue'], resolve),
          meta: { title: 'SpeAnnounce' }
        },
        {
          path: '/Home/Help',
          component: resolve => require(['../pages/HelpPage.vue'], resolve),
          meta: { title: 'Help' }
        },
        {
          path: '/Home/SpeHelp',
          component: resolve => require(['../pages/SpeHelp.vue'], resolve),
          meta: { title: 'SpeHelp' }
        },

      ]
    },
    {
      path: '/Login',
      component: resolve => require(['../pages/Login.vue'], resolve),
    },
    {
      path: '/',
      component: resolve => require(['../pages/Login.vue'], resolve),
      redirect: '/Login',
    }
  ]
})
